home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / lmuse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  3.8 KB  |  178 lines

  1. /*++ BUILD Version: 0001    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1991-1996  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     lmuse.c
  8.  
  9. Abstract:
  10.  
  11.     This file contains structures, function prototypes, and definitions
  12.     for the NetUse API.
  13.  
  14.  
  15. Environment:
  16.  
  17.     User Mode - Win32
  18.     Portable to any flat, 32-bit environment.  (Uses Win32 typedefs.)
  19.     Requires ANSI C extensions: slash-slash comments, long external names.
  20.  
  21. Notes:
  22.  
  23.     You must include NETCONS.H before this file, since this file depends
  24.     on values defined in NETCONS.H.
  25.  
  26.  
  27. --*/
  28.  
  29. /*
  30.  *      C/C++ Run Time Library - Version 9.0
  31.  *
  32.  *      Copyright (c) 1997, 1998 by Borland International
  33.  *      All Rights Reserved.
  34.  *
  35.  */
  36.  
  37. #ifndef _LMUSE_
  38. #define _LMUSE_
  39. #pragma option push -b
  40.  
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46.  
  47. #include <lmuseflg.h>                   // Deletion force level flags
  48.  
  49.  
  50. //
  51. // Function Prototypes
  52. //
  53.  
  54. NET_API_STATUS NET_API_FUNCTION
  55. NetUseAdd (
  56.     IN LPTSTR UncServerName OPTIONAL,
  57.     IN DWORD Level,
  58.     IN LPBYTE Buf,
  59.     OUT LPDWORD ParmError OPTIONAL
  60.     );
  61.  
  62. NET_API_STATUS NET_API_FUNCTION
  63. NetUseDel (
  64.     IN LPTSTR UncServerName OPTIONAL,
  65.     IN LPTSTR UseName,
  66.     IN DWORD ForceCond
  67.     );
  68.  
  69. NET_API_STATUS NET_API_FUNCTION
  70. NetUseEnum (
  71.     IN LPTSTR UncServerName OPTIONAL,
  72.     IN DWORD Level,
  73.     OUT LPBYTE *BufPtr,
  74.     IN DWORD PreferedMaximumSize,
  75.     OUT LPDWORD EntriesRead,
  76.     OUT LPDWORD TotalEntries,
  77.     IN OUT LPDWORD ResumeHandle
  78.     );
  79.  
  80. NET_API_STATUS NET_API_FUNCTION
  81. NetUseGetInfo (
  82.     IN LPTSTR UncServerName OPTIONAL,
  83.     IN LPTSTR UseName,
  84.     IN DWORD Level,
  85.     OUT LPBYTE *BufPtr
  86.     );
  87.  
  88. //
  89. //  Data Structures
  90. //
  91.  
  92. typedef struct _USE_INFO_0 {
  93.     LPTSTR  ui0_local;
  94.     LPTSTR  ui0_remote;
  95. }USE_INFO_0, *PUSE_INFO_0, *LPUSE_INFO_0;
  96.  
  97. typedef struct _USE_INFO_1 {
  98.     LPTSTR  ui1_local;
  99.     LPTSTR  ui1_remote;
  100.     LPTSTR  ui1_password;
  101.     DWORD   ui1_status;
  102.     DWORD   ui1_asg_type;
  103.     DWORD   ui1_refcount;
  104.     DWORD   ui1_usecount;
  105. }USE_INFO_1, *PUSE_INFO_1, *LPUSE_INFO_1;
  106.  
  107. typedef struct _USE_INFO_2 {
  108.     LPTSTR   ui2_local;
  109.     LPTSTR   ui2_remote;
  110.     LPTSTR   ui2_password;
  111.     DWORD    ui2_status;
  112.     DWORD    ui2_asg_type;
  113.     DWORD    ui2_refcount;
  114.     DWORD    ui2_usecount;
  115.     LPTSTR   ui2_username;
  116.     LPTSTR   ui2_domainname;
  117. }USE_INFO_2, *PUSE_INFO_2, *LPUSE_INFO_2;
  118.  
  119. typedef struct _USE_INFO_3 {
  120.     USE_INFO_2 ui3_ui2;
  121.     ULONG      ui3_flags;
  122. } USE_INFO_3, *PUSE_INFO_3, *LPUSE_INFO_3;
  123.  
  124.  
  125. //
  126. // Special Values and Constants
  127. //
  128.  
  129. //
  130. // One of these values indicates the parameter within an information
  131. // structure that is invalid when ERROR_INVALID_PARAMETER is returned by
  132. // NetUseAdd.
  133. //
  134.  
  135. #define USE_LOCAL_PARMNUM       1
  136. #define USE_REMOTE_PARMNUM      2
  137. #define USE_PASSWORD_PARMNUM    3
  138. #define USE_ASGTYPE_PARMNUM     4
  139. #define USE_USERNAME_PARMNUM    5
  140. #define USE_DOMAINNAME_PARMNUM  6
  141.  
  142. //
  143. // Values appearing in the ui1_status field of use_info_1 structure.
  144. // Note that USE_SESSLOST and USE_DISCONN are synonyms.
  145. //
  146.  
  147. #define USE_OK                  0
  148. #define USE_PAUSED              1
  149. #define USE_SESSLOST            2
  150. #define USE_DISCONN             2
  151. #define USE_NETERR              3
  152. #define USE_CONN                4
  153. #define USE_RECONN              5
  154.  
  155.  
  156. //
  157. // Values of the ui1_asg_type field of use_info_1 structure
  158. //
  159.  
  160. #define USE_WILDCARD            ( (DWORD) (-1) )
  161. #define USE_DISKDEV             0
  162. #define USE_SPOOLDEV            1
  163. #define USE_CHARDEV             2
  164. #define USE_IPC                 3
  165.  
  166. //
  167. // Flags defined in the use_info_3 structure
  168. //
  169.  
  170. #define CREATE_NO_CONNECT 0x1        // creation flags
  171.  
  172. #ifdef __cplusplus
  173. }
  174. #endif
  175.  
  176. #pragma option pop
  177. #endif // _LMUSE_
  178.